package com.artislong.controller;

import com.artislong.service.BookingTools;
import com.artislong.service.FlightBookingService;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 陈敏
 * @version FightBookingController.java, v 1.0 2025 05 11 21:37 chenmin Exp $
 * Created on 2025 05 11
 */
@RestController
@CrossOrigin
public class FightBookingController {
    private final FlightBookingService flightBookingService;

    public FightBookingController(FlightBookingService flightBookingService) {
        this.flightBookingService = flightBookingService;
    }
    @CrossOrigin
    @GetMapping(value = "/booking/list")
    public List<BookingTools.BookingDetails> getBookings() {
        return flightBookingService.getBookings();
    }
}
